Component({
  properties: {
    clear: {
      type: Boolean,
      value: true
    },
    list: {
      type: Array,
      value: []
    },
    title: {
      type: String,
      value: "历史搜索"
    },
    hidden: {
      type: null,
      value: false
    },
    borderColor: {
      type: String,
      value: 'green'
    }
  },
  methods: {
    clear() {
      this.triggerEvent('clear');
    },
    onSearch( e ) {
      let val = e.currentTarget.dataset.val;
      this.triggerEvent('click', val);
    }
  }
})